package com.gzhryc.shared_device.oem.code.agent.dao.db;

import java.util.Date;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.PrimaryKey;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.oem.code.agent.dao.enums.AgentRelationBusinessConfigEnum;
import com.gzhryc.shared_device.oem.code.business.EBusinessType;

@Table(name="agent_relation_business_config")
public class AgentRelationBusinessConfig {
	
	@PrimaryKey
    @Column(name = "user_id", notNull = true)
    protected Long userId;

    @PrimaryKey
    @Column(name = "relation_user_id", note = "关联用户ID")
    protected Long relationUserId;

	@PrimaryKey
    @Column(name = "business_type", notNull = true)
    protected String businessType;
    
    @Column(name="income_ratio",notNull = true,note = "分成比例")
    protected Double incomeRatio;
    
    @Column(name="edit_fee_state",notNull = true, defVal="1", note = "编辑费用模版")
    protected Integer editFeeState;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getRelationUserId() {
		return relationUserId;
	}

	public void setRelationUserId(Long relationUserId) {
		this.relationUserId = relationUserId;
	}

	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}

	public Double getIncomeRatio() {
		return incomeRatio;
	}

	public void setIncomeRatio(Double incomeRatio) {
		this.incomeRatio = incomeRatio;
	}

	public Integer getEditFeeState() {
		return editFeeState;
	}

	public void setEditFeeState(Integer editFeeState) {
		this.editFeeState = editFeeState;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	public String getBusinessTypeName() {
		return EBusinessType.note(this.businessType);
	}
	
	public String getEditFeeStateName() {
		return AgentRelationBusinessConfigEnum.EditFeeState.note(this.editFeeState);
	}
}
